package com.sondon.dev_info.serviceImpl;

import java.util.List;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.sondon.dev_info.dao.UserDao;
import com.sondon.dev_info.entity.User;
import com.sondon.dev_info.service.UserManager;
/**
 * @Project : dplus_shop
 * @Class : UserManagerImpl.java
 * @Author : 蔡文锋
 * @Package : com.sondon.dplus_shop.serviceImpl
 * @DateTime：2015年4月1日 上午11:22:35
 * @Blog：http://blog.csdn.net/caiwenfeng_for_23
 * @Description : { }
 */
@Service("uml")
@Transactional
public class UserManagerImpl implements UserManager {
	
	@Resource(name="userdaoimpl")
	private UserDao userDao;
	
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
//	 @Transactional
	public User getUser(String id) {
		return userDao.getUser(id);
	}
//	 @Transactional
	public List<User> getAllUser() {
		return userDao.getAllUser();
	}
//	 @Transactional
	public void addUser(User user) {
		userDao.addUser(user);
	}
//	 @Transactional
	public boolean delUser(String id) {
		
		return userDao.delUser(id);
	}
//	 @Transactional
	public boolean updateUser(User user) {
		return userDao.updateUser(user);
	}

}
